<!-- USER -> ROLES -->
<div class="srbac">
  <?php echo CHtml::beginForm(); ?>
  <?php echo CHtml::errorSummary($model); ?>
  <table>
    <tr><th colspan="2"><?php echo $this->module->tr->translate('srbac','Assign Roles to Users')?></th></tr>
    <tr>
      <th width="50%">
      <?php echo CHtml::label($this->module->tr->translate('srbac',"User"),'user'); ?></th>
      <td width="50%" rowspan="2">
        <div id="roles">
          <?php
          $this->renderPartial(
            'tabViews/userAjax',
            array('model'=>$model,'userid'=>$userid,'data'=>$data)
          );
          ?>
        </div>
      </td>
    </tr>
    <tr valign="top">
      <td><?php echo CHtml::activeDropDownList($this->module->getUserModel(),$this->module->userid,
        Chtml::listData($this->module->getUserModel()->findAll(), $this->module->userid, $this->module->username),
        array('size'=>6,'class'=>'dropdown','ajax' => array(
        'type'=>'POST',
        'url'=>array('authItem/getRoles'),
        'update'=>'#roles',
        ),
        )); ?>
      </td>
    </tr>
  </table>
  <br/>
  <?php echo CHtml::endForm(); ?>
</div>
